
def main():
	print("1~300所有数的和为:", get_sum(300))


def get_sum(num):
	if num == 1:
		return 1
	else:
		return num + get_sum(num - 1)

main()